﻿@{
    Layout = "~/Areas/Admin/Views/Shared/_LayoutCMS.cshtml";
    ViewBag.Title = "AssetAudit";
}
@model LY.Entity.T_AssetManagement
<h2></h2>
    <link href="~/Content/assets/css/Layout/css/main.css" rel="stylesheet" />
    <link href="~/Content/assets/css/plugin/validator.css" rel="stylesheet" />
    <script src="~/Content/assets/js/jquery.uploadify.v2.1.4.js"></script>
    <script src="~/Content/assets/layer/layer.min.js"></script>
    <link href="~/Content/assets/css/plugin/xjgrid.css" rel="stylesheet" />
<div class="container">

    <div id="forms" class="mt10" aria-disabled="False">
        <div class="box">
            <div class="box_border">
                <div class="box_top"><b class="pl15">审核信托信息</b></div>
                <div class="box_center">
                    <form  id="frmEdit" method="post" action="@Url.Action("TrustSave")" role="form" class="jqtransform">
                        <input id="hideId" name="ID" value="@Model.ID" type="hidden" />
                        <table class="form_table pt15 pb15" style="width: 100%;" border="0">
                            <tr>
                                <td><b class="pl15 td_right">资管信息</b></td>
                            </tr>
                               <tr>
                                <td class="td_right">资管名称：</td>
                                <td class="">
                                    <input type="text" id="AssetName" name="AssetName" value="@Model.AssetName" class="input-text lh30" size="40">
                                </td>
                                  <td class="td_right">资产管理人：</td>
                                <td class="">
                                     @* @Html.ResourceDropDownList("FundID", "FUND",Model.FundID, new { @class="wh80 select"})*@
                                    <input type="text" id="Assetmanagers" name="Assetmanagers" value="@Model.Assetmanagers" class="input-text lh30" size="40">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">资产托管人：</td>
                                <td class="">
                                       @*@Html.ResourceDropDownList("EDUCATION", "EDUCATION", @Model.Education,new {@class="wh80 select" })*@
                                    <input type="text" id="Assetcustodians" name="Assetcustodians" value="@Model.Assetcustodians" class="input-text lh30" size="40">
                                </td>
                                   <td class="td_right">起购金额：</td>
                                <td class="">
                                    <input type="text" id="Minamount" name="Minamount" value="@Model.Minamount" class="input-text lh30" size="40">元
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">资管类型：</td>
                                <td class="">
                                    <input type="text" id="Assettype" name="Assettype" value="@Model.Assettype" class="input-text lh30" size="40">
                                </td>
                                  <td class="td_right">账户名：</td>
                                <td class="">
                                    <input type="text" id="AccountName" name="AccountName" value="@Model.AccountName" class="input-text lh30" size="40">
                                </td>

                            </tr>
                            <tr>
                                <td class="td_right">账号：</td>
                                <td class="">
                                    <input type="text" id="AccountNumber" name="AccountNumber" value="@Model.AccountNumber" class="input-text lh30" size="40">
                                </td>
                                <td class="td_right">开户行：</td>
                                <td class="">
                                     <input type="text" id="Bank" name="Bank" class="input-text lh30" value="@Model.Bank" size="40" />
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right"><b style="color:red;">*</b> 期限：</td>
                                <td class="">
                                    <input type="text" id="Deadline" name="Deadline"  value="@Model.Deadline" maxlength="2" class="input-text lh30" size="40"><span style="color:red;">个月</span>
                                </td>
                                  <td class="td_right">图片：</td>
                                <td class="">
                                    <input type="hidden" id="hidAssetImg" name="AssetImg" value="@Model.AssetImg" />
                                    <img src="@Model.AssetImg" id="showimg" height="100" width="80"/>
                                    @*<input type="button" id="btnUploadImg" value=" 上传文件" />*@
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">备注：</td>
                                <td class="" colspan="3" >@Html.Raw(Model.Remark)
                                 @* <textarea id="Remark" name="Remark" rows="10" style="border:1px solid gray;width:95%;">
                                  </textarea>*@
                                </td>
                                   </tr>
                             <tr>
                                <td><b class="pl15 td_right">资管审核</b></td>
                            </tr>
                            <tr>
                                <td class="td_right">审核说明：</td>
                                @* <td class=""> 
                           @Html.ResourceRadioList("AuditStatus", "AuditStatus", Model.AuditStatus == null ? 0 : Model.AuditStatus, true)
                        </td>
                        <td class="td_right">审核说明：</td>*@
                                <td class="" colspan="3">
                                    <input type="text" id="AuditExplain" name="auditremark"  value="" class="input-text lh30" size="40">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">审核日期：</td>
                                <td class="">
                                    <input type="text" name="datetime"  disabled="disabled" id="AuditTime"  value="@DateTime.Now.ToString()" class="input-text lh30" size="40" />
                                </td>

                                <td class="td_right">审核人：</td>
                                <td class="">
                                    <input type="text" name="audituser" disabled="disabled" id="AuditUser" value="@ViewBag.loguser" class="input-text lh30" size="40">
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right"></td>
                                <td class=""></td>
                         
                               @* <td class="">
                                       <textarea id="Content" name="Content" rows="10" style="height: 260px; width: 90%">@Model.Peopleremark</textarea>
                                </td*@
                            </tr>
                            <tr>
                                <td class="td_center" colspan="5">
                                    <input type="button" id="btnAudit" name="button" style="margin-right: 50px;" class="btn btn82 btn_save2" value="审核">
                                    <input type="button" id="btnReturn" name="button" class="btn btn82 btn_res" value="返回">
                                    <input type="button" id="btnback" name="button" class="btn btn82 btn_res" value="退回" style="margin-left:50px;">
                                </td>
                            </tr>
                        </table>
                         <input type="hidden" id="hideContent" name="Peopleremark" />
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@section jssection{
    <script type="text/javascript">
        var util = {};
        var options = {
            AuditUrl: "@Url.Action("Audit")"
        };

        $("#btnReturn").click(function () {
            window.location.href = "/Admin/Asset/AssetAuditlist";
        });
        //审核
        $("#btnAudit").click(function() {
            
            $.post(options.AuditUrl, { id: $('#hideId').val(), audituser: $('#AuditUser').val(), status: 0, datetime: $('#AuditTime').val(), auditremark: $('#AuditExplain').val() },
              function (res) {
                  if (res.Status > 0) {
                      alert(res.Message);
                      window.location.href = "/Admin/Asset/AssetAuditlist";
                  }
                  else {
                      alert(res.Message);
                  }
              },
              "json"
        );
        });

        //退回
        $("#btnback").click(function (e) {
            $.post(options.AuditUrl, { id: $('#hideId').val(), audituser: $('#AuditUser').val(), status: 2, datetime: $('#AuditTime').val(), auditremark: $('#AuditExplain').val() },
              function (res) {
                  if (res.Status > 0) {

                      alert("操作成功！");
                      window.location.href = "/Admin/Asset/AssetAuditlist";
                  }
                  else {
                      alert("操作失败！");
                  }
              },
              "json"
        );
        });
    </script>

    <script src="~/Content/assets/plugins/validator/validator.js"></script>
    <script src="~/Content/assets/js/common.js"></script>
    <script src="~/Content/assets/DatePicker/WdatePicker.js"></script>
    <script src="~/Content/assets/layer/layer.min.js"></script>
    <script src="~/Content/assets/app/common/ajaxupload.js"></script>
}